<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>uCXpresso.BLE: i2c.h Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../upnp.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">uCXpresso.BLE
   &#160;<span id="projectnumber">v1.0.4</span>
   </div>
   <div id="projectbrief">RTOS C++ Framework for Bluetooth Low Energy</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d5/daf/i2c_8h_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">i2c.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> ===============================================================================</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> Name        : i2c.h</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> Author      : uCXpresso</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> Version     : v1.0.1</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> Date        : 2014/4/5</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> Copyright   : Copyright (C) www.embeda.com.tw</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> Description : I2C driver</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> ===============================================================================</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">                                 History</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> ---------+---------+--------------------------------------------+-------------</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> DATE     | VERSION |   DESCRIPTIONS                             |  By</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> ---------+---------+--------------------------------------------+-------------</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> 2014/1/1   v1.0.0  First Edition for nano11Uxx                     Jason</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> 2014/4/5   v1.0.1  Add more read &amp; write member functions in       Jason</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">                        CMaster class.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">                    Fixed I2C driver lock problems.</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">                    Remove I2C-Slave mode.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">                    Move readwrite member to base clase.</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> ===============================================================================</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef _I2C_H_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define _I2C_H_</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;class/peripheral.h&quot;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;class/stream.h&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;class/semaphore.h&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">   33</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a49e65f3960437d80b8328e7898cc90de">   34</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a49e65f3960437d80b8328e7898cc90de">I2C_BUSY</a> = 6,               </div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a8d4a8c183322e67bcce1a4d662618923">   35</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a8d4a8c183322e67bcce1a4d662618923">I2C_NO_DATA</a> = 7,            </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a44f16e1b97a6ecfa3a553d527b4c11fc">   36</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a44f16e1b97a6ecfa3a553d527b4c11fc">I2C_NACK_ON_ADDRESS</a> = 8,    </div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177ac7449bc5b9560aca15fd4e9079737bde">   37</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177ac7449bc5b9560aca15fd4e9079737bde">I2C_NACK_ON_DATA</a> = 9,       </div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a5dc03718fec58b738e4267364ed81564">   38</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a5dc03718fec58b738e4267364ed81564">I2C_ARBITRATION_LOST</a> = 10,  </div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a2cac9caecd6bbd3b917fcad0abbdece3">   39</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a2cac9caecd6bbd3b917fcad0abbdece3">I2C_TIME_OUT</a> = 11,          </div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177aeceba296bdda2b90e8835c431fe7a72a">   40</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177aeceba296bdda2b90e8835c431fe7a72a">I2C_OK</a> = 12,                </div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a25561df6f4fd24e7c0aa98f5e10ed863">   41</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a25561df6f4fd24e7c0aa98f5e10ed863">I2C_BUFFER</a> = 13             </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;}<a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a>;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#define DEF_I2C_TIMEOUT 1000</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="../../d0/dce/class_c_i2_c.html">   51</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d0/dce/class_c_i2_c.html">CI2C</a>: <span class="keyword">public</span> <a class="code" href="../../d9/db6/class_c_peripheral.html">CPeripheral</a> {</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="../../d0/dce/class_c_i2_c.html#aeff3f958457f68d453fe125b031c4539">enable</a>();</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="../../d0/dce/class_c_i2_c.html#a36a89b063ac68ff1710193258e76ea73">disable</a>();</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/dce/class_c_i2_c.html#ab5158b0fe99495c186200ac1d6ef4e52">frequency</a>(uint32_t hz);</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d0/dce/class_c_i2_c.html#a7f05058db3c41dec6abf7edef55c4024">readwrite</a>(<span class="keywordtype">void</span> *txbuf, <span class="keywordtype">int</span> txsize, <span class="keywordtype">void</span> *rxbuf, <span class="keywordtype">int</span> rxsize, uint32_t timeout=DEF_I2C_TIMEOUT);</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="comment">//</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="comment">//  PRIVATE</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="comment"></span>    <a class="code" href="../../d0/dce/class_c_i2_c.html">CI2C</a>();</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="keyword">virtual</span>     ~<a class="code" href="../../d0/dce/class_c_i2_c.html">CI2C</a>();</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> write(uint8_t *data, <span class="keywordtype">int</span> length);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> read(uint8_t *data, <span class="keywordtype">int</span> length);</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> engine(uint32_t timeout);</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> onState(uint32_t value);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> start();   <span class="comment">// Create I2C start condition</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> stop();    <span class="comment">// Set the I2C stop condition</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="comment">// irq &amp; status control</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <a class="code" href="../../d0/d06/class_c_semaphore.html">CSemaphore</a>  m_semState;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    uint32_t    m_state;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="comment">// buffer control</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    uint8_t     *I2CMasterBuffer;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    uint8_t     *I2CSlaveBuffer;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordtype">int</span>         RdIndex;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordtype">int</span>         WrIndex;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordtype">int</span>         I2CWriteLength;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordtype">int</span>         I2CReadLength;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;};</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="../../d7/db9/class_c_i2_c_master.html">  112</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d7/db9/class_c_i2_c_master.html">CI2CMaster</a>: <span class="keyword">public</span> <a class="code" href="../../d0/dce/class_c_i2_c.html">CI2C</a> {</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#a328c3687134f58450d5a0ea571a0cc0f">readBit</a>(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint8_t *data, uint32_t timeout=DEF_I2C_TIMEOUT);</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#aecc2f84c5b45224112ae27e70e1f8364">readBitW</a>(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t *data, uint16_t timeout=DEF_I2C_TIMEOUT);</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#a48f98174a56312ff9432a505a04449bb">readBits</a>(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint8_t *data, uint32_t timeout=DEF_I2C_TIMEOUT);</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#afc8810c7c72f4cb57e77cd8073465bb8">readBitsW</a>(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t *data, uint32_t timeout=DEF_I2C_TIMEOUT);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#a748148275878f4899f2b3f588e823e0b">readByte</a>(uint8_t devAddr, uint8_t regAddr, uint8_t *data, uint32_t timeout=DEF_I2C_TIMEOUT);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#a793f53f202ebaa6da62e54d804423e4c">readWord</a>(uint8_t devAddr, uint8_t regAddr, uint16_t *data, uint32_t timeout=DEF_I2C_TIMEOUT);</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#a05b98ae4964e3be1b858c1573cc1f445">readBytes</a>(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint8_t *data, uint32_t timeout=DEF_I2C_TIMEOUT);</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#a895ef8992b4bdffb85e391d16fac5e5d">readWords</a>(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data, uint32_t timeout=DEF_I2C_TIMEOUT);</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#ad080989288fe1503a68a97ca0d78f9bd">writeBit</a>(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint8_t value);</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#a1b41665816fe8de9e6a564a8044df52e">writeBitW</a>(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t data);</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#ab97767680e94cc9d12dc45e44f8c87ce">writeBits</a>(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint8_t data);</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#ab0ff5998b5ae3416e6e271213f6b2c09">writeBitsW</a>(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t data);</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#ae919bbeb27f1c3e3d791d8972a498c66">writeByte</a>(uint8_t devAddr, uint8_t regAddr, uint8_t data);</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#aade1859abec8ba59c8536e86dde0b74b">writeWord</a>(uint8_t devAddr, uint8_t regAddr, uint16_t data);</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#ac0e667cdc2f19401ce0d869482511e79">writeBytes</a>(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint8_t* data);</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a> <a class="code" href="../../d7/db9/class_c_i2_c_master.html#a97dc3cfe78647f383ad2f8f2545034da">writeWords</a>(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t* data);</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;};</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* I2C_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="class_c_i2_c_master_html_ab97767680e94cc9d12dc45e44f8c87ce"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#ab97767680e94cc9d12dc45e44f8c87ce">CI2CMaster::writeBits</a></div><div class="ttdeci">I2C_ERROR_T writeBits(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint8_t data)</div></div>
<div class="ttc" id="group___enumerations_html_ggae2de52b3324336037756b7c011706177a5dc03718fec58b738e4267364ed81564"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a5dc03718fec58b738e4267364ed81564">I2C_ARBITRATION_LOST</a></div><div class="ttdef"><b>Definition:</b> i2c.h:38</div></div>
<div class="ttc" id="group___enumerations_html_gae2de52b3324336037756b7c011706177"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gae2de52b3324336037756b7c011706177">I2C_ERROR_T</a></div><div class="ttdeci">I2C_ERROR_T</div><div class="ttdef"><b>Definition:</b> i2c.h:33</div></div>
<div class="ttc" id="class_c_i2_c_master_html_a748148275878f4899f2b3f588e823e0b"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#a748148275878f4899f2b3f588e823e0b">CI2CMaster::readByte</a></div><div class="ttdeci">I2C_ERROR_T readByte(uint8_t devAddr, uint8_t regAddr, uint8_t *data, uint32_t timeout=DEF_I2C_TIMEOUT)</div></div>
<div class="ttc" id="class_c_semaphore_html"><div class="ttname"><a href="../../d0/d06/class_c_semaphore.html">CSemaphore</a></div><div class="ttdef"><b>Definition:</b> semaphore.h:33</div></div>
<div class="ttc" id="class_c_i2_c_master_html_ac0e667cdc2f19401ce0d869482511e79"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#ac0e667cdc2f19401ce0d869482511e79">CI2CMaster::writeBytes</a></div><div class="ttdeci">I2C_ERROR_T writeBytes(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint8_t *data)</div></div>
<div class="ttc" id="group___enumerations_html_ggae2de52b3324336037756b7c011706177a44f16e1b97a6ecfa3a553d527b4c11fc"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a44f16e1b97a6ecfa3a553d527b4c11fc">I2C_NACK_ON_ADDRESS</a></div><div class="ttdef"><b>Definition:</b> i2c.h:36</div></div>
<div class="ttc" id="class_c_i2_c_master_html_a97dc3cfe78647f383ad2f8f2545034da"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#a97dc3cfe78647f383ad2f8f2545034da">CI2CMaster::writeWords</a></div><div class="ttdeci">I2C_ERROR_T writeWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data)</div></div>
<div class="ttc" id="group___enumerations_html_ggae2de52b3324336037756b7c011706177a8d4a8c183322e67bcce1a4d662618923"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a8d4a8c183322e67bcce1a4d662618923">I2C_NO_DATA</a></div><div class="ttdef"><b>Definition:</b> i2c.h:35</div></div>
<div class="ttc" id="class_c_i2_c_html_aeff3f958457f68d453fe125b031c4539"><div class="ttname"><a href="../../d0/dce/class_c_i2_c.html#aeff3f958457f68d453fe125b031c4539">CI2C::enable</a></div><div class="ttdeci">void enable()</div></div>
<div class="ttc" id="class_c_i2_c_html_a36a89b063ac68ff1710193258e76ea73"><div class="ttname"><a href="../../d0/dce/class_c_i2_c.html#a36a89b063ac68ff1710193258e76ea73">CI2C::disable</a></div><div class="ttdeci">void disable()</div></div>
<div class="ttc" id="class_c_i2_c_master_html_aecc2f84c5b45224112ae27e70e1f8364"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#aecc2f84c5b45224112ae27e70e1f8364">CI2CMaster::readBitW</a></div><div class="ttdeci">I2C_ERROR_T readBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t *data, uint16_t timeout=DEF_I2C_TIMEOUT)</div></div>
<div class="ttc" id="class_c_i2_c_html_a7f05058db3c41dec6abf7edef55c4024"><div class="ttname"><a href="../../d0/dce/class_c_i2_c.html#a7f05058db3c41dec6abf7edef55c4024">CI2C::readwrite</a></div><div class="ttdeci">I2C_ERROR_T readwrite(void *txbuf, int txsize, void *rxbuf, int rxsize, uint32_t timeout=DEF_I2C_TIMEOUT)</div></div>
<div class="ttc" id="class_c_i2_c_html_ab5158b0fe99495c186200ac1d6ef4e52"><div class="ttname"><a href="../../d0/dce/class_c_i2_c.html#ab5158b0fe99495c186200ac1d6ef4e52">CI2C::frequency</a></div><div class="ttdeci">virtual void frequency(uint32_t hz)</div></div>
<div class="ttc" id="class_c_i2_c_master_html_afc8810c7c72f4cb57e77cd8073465bb8"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#afc8810c7c72f4cb57e77cd8073465bb8">CI2CMaster::readBitsW</a></div><div class="ttdeci">I2C_ERROR_T readBitsW(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t *data, uint32_t timeout=DEF_I2C_TIMEOUT)</div></div>
<div class="ttc" id="class_c_i2_c_master_html_a48f98174a56312ff9432a505a04449bb"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#a48f98174a56312ff9432a505a04449bb">CI2CMaster::readBits</a></div><div class="ttdeci">I2C_ERROR_T readBits(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint8_t *data, uint32_t timeout=DEF_I2C_TIMEOUT)</div></div>
<div class="ttc" id="class_c_i2_c_master_html_ad080989288fe1503a68a97ca0d78f9bd"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#ad080989288fe1503a68a97ca0d78f9bd">CI2CMaster::writeBit</a></div><div class="ttdeci">I2C_ERROR_T writeBit(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint8_t value)</div></div>
<div class="ttc" id="group___enumerations_html_ggae2de52b3324336037756b7c011706177a2cac9caecd6bbd3b917fcad0abbdece3"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a2cac9caecd6bbd3b917fcad0abbdece3">I2C_TIME_OUT</a></div><div class="ttdef"><b>Definition:</b> i2c.h:39</div></div>
<div class="ttc" id="class_c_i2_c_master_html_ae919bbeb27f1c3e3d791d8972a498c66"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#ae919bbeb27f1c3e3d791d8972a498c66">CI2CMaster::writeByte</a></div><div class="ttdeci">I2C_ERROR_T writeByte(uint8_t devAddr, uint8_t regAddr, uint8_t data)</div></div>
<div class="ttc" id="group___enumerations_html_ggae2de52b3324336037756b7c011706177ac7449bc5b9560aca15fd4e9079737bde"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177ac7449bc5b9560aca15fd4e9079737bde">I2C_NACK_ON_DATA</a></div><div class="ttdef"><b>Definition:</b> i2c.h:37</div></div>
<div class="ttc" id="class_c_i2_c_master_html_a05b98ae4964e3be1b858c1573cc1f445"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#a05b98ae4964e3be1b858c1573cc1f445">CI2CMaster::readBytes</a></div><div class="ttdeci">I2C_ERROR_T readBytes(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint8_t *data, uint32_t timeout=DEF_I2C_TIMEOUT)</div></div>
<div class="ttc" id="class_c_i2_c_master_html_aade1859abec8ba59c8536e86dde0b74b"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#aade1859abec8ba59c8536e86dde0b74b">CI2CMaster::writeWord</a></div><div class="ttdeci">I2C_ERROR_T writeWord(uint8_t devAddr, uint8_t regAddr, uint16_t data)</div></div>
<div class="ttc" id="class_c_i2_c_master_html_a328c3687134f58450d5a0ea571a0cc0f"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#a328c3687134f58450d5a0ea571a0cc0f">CI2CMaster::readBit</a></div><div class="ttdeci">I2C_ERROR_T readBit(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint8_t *data, uint32_t timeout=DEF_I2C_TIMEOUT)</div></div>
<div class="ttc" id="class_c_i2_c_master_html_a1b41665816fe8de9e6a564a8044df52e"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#a1b41665816fe8de9e6a564a8044df52e">CI2CMaster::writeBitW</a></div><div class="ttdeci">I2C_ERROR_T writeBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t data)</div></div>
<div class="ttc" id="class_c_i2_c_master_html_a793f53f202ebaa6da62e54d804423e4c"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#a793f53f202ebaa6da62e54d804423e4c">CI2CMaster::readWord</a></div><div class="ttdeci">I2C_ERROR_T readWord(uint8_t devAddr, uint8_t regAddr, uint16_t *data, uint32_t timeout=DEF_I2C_TIMEOUT)</div></div>
<div class="ttc" id="class_c_i2_c_master_html_a895ef8992b4bdffb85e391d16fac5e5d"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#a895ef8992b4bdffb85e391d16fac5e5d">CI2CMaster::readWords</a></div><div class="ttdeci">I2C_ERROR_T readWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data, uint32_t timeout=DEF_I2C_TIMEOUT)</div></div>
<div class="ttc" id="class_c_peripheral_html"><div class="ttname"><a href="../../d9/db6/class_c_peripheral.html">CPeripheral</a></div><div class="ttdef"><b>Definition:</b> peripheral.h:27</div></div>
<div class="ttc" id="group___enumerations_html_ggae2de52b3324336037756b7c011706177a25561df6f4fd24e7c0aa98f5e10ed863"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a25561df6f4fd24e7c0aa98f5e10ed863">I2C_BUFFER</a></div><div class="ttdoc">Memory Buffer Error. </div><div class="ttdef"><b>Definition:</b> i2c.h:41</div></div>
<div class="ttc" id="class_c_i2_c_master_html"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html">CI2CMaster</a></div><div class="ttdef"><b>Definition:</b> i2c.h:112</div></div>
<div class="ttc" id="group___enumerations_html_ggae2de52b3324336037756b7c011706177a49e65f3960437d80b8328e7898cc90de"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177a49e65f3960437d80b8328e7898cc90de">I2C_BUSY</a></div><div class="ttdef"><b>Definition:</b> i2c.h:34</div></div>
<div class="ttc" id="class_c_i2_c_html"><div class="ttname"><a href="../../d0/dce/class_c_i2_c.html">CI2C</a></div><div class="ttdef"><b>Definition:</b> i2c.h:51</div></div>
<div class="ttc" id="class_c_i2_c_master_html_ab0ff5998b5ae3416e6e271213f6b2c09"><div class="ttname"><a href="../../d7/db9/class_c_i2_c_master.html#ab0ff5998b5ae3416e6e271213f6b2c09">CI2CMaster::writeBitsW</a></div><div class="ttdeci">I2C_ERROR_T writeBitsW(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t data)</div></div>
<div class="ttc" id="group___enumerations_html_ggae2de52b3324336037756b7c011706177aeceba296bdda2b90e8835c431fe7a72a"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ggae2de52b3324336037756b7c011706177aeceba296bdda2b90e8835c431fe7a72a">I2C_OK</a></div><div class="ttdef"><b>Definition:</b> i2c.h:40</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_d9ab3e09413249e340719d1c246acc66.html">Jason Project</a></li><li class="navelem"><a class="el" href="../../dir_e60b0d0338763df7a227cbecf5ac6106.html">Firmware</a></li><li class="navelem"><a class="el" href="../../dir_c8ef7bdfc8622ceb56fdbfff8f44a6b4.html">lpcxpresso</a></li><li class="navelem"><a class="el" href="../../dir_bc2544560b94a5512f672a61310393b1.html">ucxpresso.lite</a></li><li class="navelem"><a class="el" href="../../dir_89b485e3174b4ad30c1cd4b50a79dec9.html">uCXpresso.BLE</a></li><li class="navelem"><a class="el" href="../../dir_ef35519cefd621f663612ebad34cbfc9.html">inc</a></li><li class="navelem"><a class="el" href="../../dir_23b8956a4518e3beec6402c1bb795b19.html">class</a></li><li class="navelem"><b>i2c.h</b></li>
    <li class="footer">Generated on Fri Apr 11 2014 23:43:26 for uCXpresso.BLE by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
